﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>日志评论</title>
    <link href="css/blog_comment.css" rel="stylesheet" type="text/css" media="all">
    <script type="text/javascript" src="/js/axios.min.js"></script>
    <script type="text/javascript" src="/js/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/js/vue.min.js"></script>
</head>

<body>
<div id="div1">


    <div id="head">
        <span class="span1">SmartBlog</span>
        <span class="span2"><em>share java knowledge</em></span>
    </div>
    <div id="body1">
        <div class="title">
            <ul>
                <li id="shouye"><a href="#">首 页</a></li>
                <li><a href="#">后台管理</a></li>
                <li><a href="#">退 出</a></li>
            </ul>
        </div>
        <div class="left">
            <br/>

            <div class="left1">
                &lt;&lt;<a href="/index.html">返回</a>
            </div>
            <div class="xia">
                <ul>
                    <li class="top1">{{entry.title}}</li>
                    <li class="top2">{{entry.content}}</li>
                    <br/>
                    <div v-for="conmment in conmmentList">
                    <li>{{conmment.posttime}}</li>
                    <li class="top3"><span>评论:</span></li>
                    <li class="top4">{{conmment.content}}</li>
                    <li>
                        <hr/>
                    </li>
                    </div>

                    <li class="top3"><span>发表评论：</span></li>
                    <li><input type="text" name="yanzheng"/>验证码(*)</li>
                    <br/>
                    <li><img src="#"/></li>
                    <li><textarea name="" cols="95" rows="18"></textarea></li>
                </ul>
                <input name="" type="submit" value="提 交" class="button"/>

            </div><!--内容-->
        </div><!-- 内容-->
        <div class="right">
            <div class="right1_1">
                <div class="right2"> &nbsp;关于</div>
                <span> &nbsp;this is my smart bolg, share java knowledge on ssh</span>
            </div>
            <div class="right1">
                <div class="right2"> &nbsp;最新日志</div>
                <ul>
                    <li>java日志8</li>
                    <li></li>
                    <li></li>
                </ul>
            </div>
            <div class="right1">
                <div class="right2"> &nbsp;最新评论</div>
                <ul>
                    <li></li>
                    <li></li>
                    <li></li>
                </ul>
            </div>
            <div class="right1_1">
                <div class="right2"> &nbsp;友情链接</div>
                <p>&nbsp;&nbsp;&nbsp;<a href="#">百度</a>
                    <a href="#">新浪</a>
                    <a href="#">搜狐</a>
                    <a href="#">淘宝</a>
                    <a href="#">京东</a>
                    <a href="#">赶集</a>
                </p>
            </div>
        </div><!-- 内容-->
    </div>
    <div id="foot"><span>Copyright &copy; 2013-2020 </span></div>
</div>
</body>
</html>
<script>
    var vm = new Vue({
        el: "#div1",
        data: {
            entry: null,
            conmmentList: []
        },
        created() {
            this.findEnptyLById();
        },
        methods: {
            //页面加载就执行的方法
            findEnptyLById: function () {
                var path = "/findEnptyLById";
                axios.get(path, null).then(function (obj) {
                    if (obj.status == 200) {
                        if (obj.data.code == 200) {
                            //alert(obj.data.code);
                            var result = obj.data.result;
                            vm.entry = result.entry;
                            vm.conmmentList = result.conmmentList;
                        }
                    }
                }).catch(function () {
                    alert("findAllEnptyL--->出现了异常")
                })
            }
        },
    })
</script>
